package com.gimi.cloud.jimi.dao.dao.product;

import java.util.List;

import com.gimi.cloud.jimi.dto.product.ProductImgDTO;
import org.apache.ibatis.annotations.Select;

import com.gimi.cloud.jimi.entity.product.ProductImgEntity;

public interface ProductImgDao extends BaseMapper<ProductImgEntity> {
    int deleteByPrimaryKey(int prodImgId);
    
    int deleteByProdId(String prodId);
    
    int insert(ProductImgEntity record);

    int insertSelective(ProductImgEntity record);

//    ProductImgEntity selectByPrimaryKey(int prodImgId);
//
//    List<ProductImgEntity> selectByprodId(String prodId);

    ProductImgDTO selectByPrimaryKey(int prodImgId);

    List<ProductImgDTO> selectByprodId(String prodId);
    
    @Select("SELECT img_url FROM ec_prod_img WHERE prod_id = #{prodId}")
    List<String> selectUrlByprodId(String prodId);

    int updateByPrimaryKeySelective(ProductImgEntity record);

    int updateByPrimaryKey(ProductImgEntity record);
}